// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

#if false
let demo = Product.executable(name: "SwiftyOverlayDemo", targets: ["SwiftyOverlayDemo"])

let package = Package(
    name: "SwiftyOverlay",
    defaultLocalization: "en",
    platforms: [.iOS(.v13)],
    products: [
        // Products define the executables and libraries a package produces, making them visible to other packages.
        .library(
            name: "SwiftyOverlay",
            targets: ["SwiftyOverlay"]),
        demo,
    ],
    dependencies: [],
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        .target(
            name: "SwiftyOverlay"),
        .executableTarget(
            name: "SwiftyOverlayDemo", dependencies: [], path: "SwiftyOverlayDemo")
    ]
)

#endif

let package = Package(
    name: "SwiftyOverlay",
    products: [
        // Products define the executables and libraries a package produces, making them visible to other packages.
        .library(
            name: "SwiftyOverlay",
            targets: ["SwiftyOverlay"]),
    ],
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        .target(
            name: "SwiftyOverlay",
            // Enabling Module Stability in Swift Package Manager Projects
            // - https://swiftrocks.com/enabling-module-stability-in-swift-package-manager-projects
            swiftSettings: [.unsafeFlags(["-Xswiftc", "-enable-library-evolution", "-enable-library-evolution"])]
            
//            swiftSettings: [.unsafeFlags(["-enable-library-evolution"])]
        )
    ]
)
